//
//  YGPwdTableViewCell.m
//  yuanshangyiliao
//
//  Created by icholab on 2021/3/17.
//

#import "YGPwdTableViewCell.h"

@interface YGPwdTableViewCell ()

@property(nonatomic, strong)UITextField *pwdField;    //密码

@end

@implementation YGPwdTableViewCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initView];
        [self initContraints];
    }
    return self;
}

- (void)initView{

    [self addContentView:self.pwdField];
   
}


- (void)initContraints{
    [self.pwdField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(self.contentSuperView.mas_height);
        make.width.mas_equalTo(200);
        make.height.mas_equalTo(self.contentSuperView.mas_height);
    }];
    
}

- (UITextField *)pwdField{
    if (!_pwdField) {
        _pwdField =[[UITextField alloc] init];
        _pwdField.font= [UIFont systemFontOfSize:14];
        _pwdField.layer.borderWidth=0;
        _pwdField.placeholder=@"6-16位字母、数字或符号组合";
        _pwdField.textAlignment= NSTextAlignmentLeft;
        _pwdField.delegate=self;
        [_pwdField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
        
        
    }
    return _pwdField;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
